package com.mall.cms.controller;

import com.mall.cms.service.PrefrenceAreaService;
import com.mall.model.domain.cms.PrefrenceArea;
import com.mall.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/prefrenceArea")
public class PrefrenceAreaController {

    @Autowired
    private PrefrenceAreaService prefrenceAreaService;

    @GetMapping("/listAll")
    public R listAll(){
        List<PrefrenceArea> list = prefrenceAreaService.listAll();
        return R.success(list);
    }
}
